home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Control Panel Hide 6.xpl < prev    next >
Text File  |  1999-07-12  |  3KB  |  105 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\General\Control Panel"
  5. "NAME"="Visible Items (OEMs)"
  6. "VERSION"="1.01"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "3COM Pace Config" applet"
  9. "TEXT 2"="Display "Xteq X-Setup" applet"
  10. "TEXT 3"="Display "RealPlayer Preferences" applet"
  11. "TEXT 4"="Display "MS Office FindFast Control" applet"
  12. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  16. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  17. "COMMENT 3"="See also: MS KB Q207750"
  18.  
  19.  
  20. '******************************************************************
  21. '***                COPY !!!! ONLY EDIT LINES BELOW!!!!        ****
  22. '******************************************************************
  23. sVals=Array("pacecfg.cpl","xqxsetup.cpl","prefscpl.cpl","findfast.cpl") 
  24. sPath="HKCU\Control Panel\Don't Load\"
  25. sFile="CONTROL.INI"
  26. sFileSec="Don't Load"
  27. '******************************************************************
  28. '*** Keep an eye on the order (must be the same as "TEXT x") ! ****
  29. '******************************************************************
  30.  
  31.  
  32.  
  33. SUB Plugin_Initialize
  34.  for i=0 to UBound(sVals)
  35.      Call ReadIt(i+1,sVals(i)) 
  36.  next 
  37. END SUB
  38.  
  39. Sub ReadIt(ITM,VAL)
  40.   If GetWinVer=2 then
  41.  
  42.      s=RegReadValue(sPath & VAL)
  43.      if IsEmpty(s)=true then
  44.         Call SetUIElement(ITM,true)
  45.      else
  46.         Call SetUIElement(ITM,false)
  47.      end if
  48.  
  49.   else
  50.  
  51.     s=IniReadValue(sFile,sFileSec,VAL)
  52.     if len(s)>0 then
  53.        Call SetUIElement(ITM,false)
  54.     else
  55.        Call SetUIElement(ITM,true)
  56.     end if
  57.      
  58.   end if
  59.      
  60. End Sub
  61.  
  62. 'Called when the Plugin should validate the Data the user has entered
  63. SUB Plugin_CheckData(ElementIndex)
  64. END SUB
  65.  
  66. 'Called when the Plugin should apply the changes
  67. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  68.  for i=0 to UBound(sVals)
  69.      Call WriteIt(i+1,sVals(i)) 
  70.  next 
  71. END SUB
  72.  
  73. Sub WriteIt(ITM,VAL)
  74.  b=GetUIElement(ITM)
  75.  if b=true then
  76.     'Display it
  77.  
  78.     if GetWinVer=2 then  
  79.        s=RegReadValue(sPath & VAL)
  80.        if IsEmpty(s)=false then
  81.           Call RegDeleteValue(sPath & VAL)
  82.        end if
  83.     else
  84.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  85.     end if
  86.  
  87.  else
  88.    'Hide it
  89.    
  90.    if GetWinVer=2 then
  91.       Call RegWriteValue(sPath & VAL,"1",1) 
  92.    else
  93.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  94.    end if
  95.  
  96.  end if   
  97. End Sub
  98.  
  99.  
  100. 'Called when the Plugin is about to be removed from memory
  101. SUB Plugin_Terminate
  102. END SUB
  103.  
  104.  
  105.